#ifndef SHOW_BYTES_H
#define SHOW_BYTES_H
#include"is_little_endian.h"

typedef unsigned char *byte_pointer;

void show_bytes(byte_pointer start, int len) {
    if(is_little_endian()){
        for(int i = len - 1; i >=0; --i){
            printf(" %.2x", start[i]);    //line:data:show_bytes_printf
        }
    }else{
        for (int i = 0; i < len; i++)
            printf(" %.2x", start[i]);    //line:data:show_bytes_printf
    }
    printf("\n");
}

#endif // SHOW_BYTES_H
